﻿using System;
using System.Text;
using System.Collections.Generic;
using Demo_G.O.S.E.ServerEngine.Common;
using Demo_G.O.S.E.ServerEngine.Network;

namespace Demo_G.O.S.E.ServerEngine.GameCommand
{
    /// <summary>
    /// 游戏内的命令行
    /// </summary>
    public class BaseGameCommand
    {
        /// <summary>
        /// 
        /// </summary>
        internal string m_strGameCommand = string.Empty;
        /// <summary>
        /// 
        /// </summary>
        public string GameCommand
        {
            get { return m_strGameCommand; }
        }

        /// <summary>
        /// 
        /// </summary>
        internal string m_strGameCommandLine = string.Empty;
        /// <summary>
        /// 
        /// </summary>
        public string GameCommandLine
        {
            get { return m_strGameCommandLine; }
        }

        /// <summary>
        /// 
        /// </summary>
        internal AccessLevel m_iAccessLevel = AccessLevel.GameMaster;
        /// <summary>
        /// 
        /// </summary>
        public AccessLevel AccessLevel
        {
            get { return m_iAccessLevel; }
        }

        /// <summary>
        /// 
        /// </summary>
        internal event EventDelegateGameCommand EventGameCommand;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="netState"></param>
        public void OnEventGameCommand( NetState netState )
        {
            GameCommandEventArgs l_EventArgs = new GameCommandEventArgs( netState, m_strGameCommandLine );
            if ( EventGameCommand != null )
                EventGameCommand( l_EventArgs );
        }
    }
}

